home *** CD-ROM | disk | FTP | other *** search
- Path: news.chattanooga.net!usenet
- From: "Eric W. Bradway" <ebradway@microsports.com>
- Newsgroups: comp.lang.c
- Subject: Re: The size of a file
- Date: Tue, 30 Jan 1996 18:52:02 -0500
- Organization: Micro Sports, Inc.
- Message-ID: <310EAF22.1F95@microsports.com>
- References: <4ebc03$4gv@gate.compart.fi> <59.28250.5782@windmill.com> <4elf3v$s5o@noc.tor.hookup.net>
- NNTP-Posting-Host: 205.244.28.38
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win95; I)
-
- Richard Steadman wrote:
- >
- > charlie.brown@windmill.com (Charlie Brown) wrote:
- > >F>This is driving me nuts. I can't find a simple way to get the size of a
- > > >disk file. This must be possible using the standard C library, but I
- > > >haven't figured out how!
-
- > But there's no way to get the file size if its length is greater
- > than will fit in a long int?
-
- Now you're treading into OS-specific grounds. Assuming you are using an
- OS that allows > 2gig files (or >2gig partitions) then you aren't using
- DOS (or at least, not DOS 7.0/Win95). If you are using Win95/NT then
- there is a specific API call to get file size, disk space
- avail/used/total that handle the big files. If you are using DOS 7.0
- then there are some extensions to the DOS int21 API that provide this
- info.
-
- I'm not experienced enough in UNIX to give advice there....
-
- -Eric
-